import java.awt.*;
import java.awt.event.*;

public
class SMSInterface extends Frame implements ActionListener, WindowListener
{
	protected TextField tfNumFrom = null;
	protected TextField tfNumTo = null;
	protected TextArea taText = null;

	protected Button bExit = null;
	protected Button bSend = null;

	protected static SMSInterface smsInterface;	

	public SMSInterface()
	{
		super("SMS 1.0");
		initLayout();
		addWindowListener(this);
		setVisible(true);
	}
	public void initLayout()
	{
		setLayout(null);
		setSize(320, 300);
		
		Label labelFrom = new Label();
		labelFrom.setBounds(10, 28, 30, 10);
		labelFrom.setText("Od:");
		add(labelFrom);

		tfNumFrom = new TextField();
		tfNumFrom.setBounds(10, 40, 300, 20);
		add(tfNumFrom);
		
		Label labelTo = new Label();
		labelTo.setBounds(10, 62, 30, 10);
		labelTo.setText("Do:");
		add(labelTo);

		tfNumTo = new TextField();
		tfNumTo.setBounds(10, 75, 300, 20);
		add(tfNumTo);
		
		Label labelText = new Label();
		labelText.setBounds(10, 102, 40, 10);
		labelText.setText("Tekst:");
		add(labelText);

		taText = new TextArea();
		taText.setBounds(10, 115, 300, 100);
		add(taText);

		bSend = new Button("Send");
		bSend.setBounds(50, 230, 100, 20);
		bSend.addActionListener(this);
		add(bSend);
		bExit = new Button("Exit");
		bExit.setBounds(160, 230, 100, 20);
		bExit.addActionListener(this);
		add(bExit);
	}
	public static void main(String args[])
	{
		smsInterface = new SMSInterface();
	}
	public void actionPerformed(ActionEvent evt)
	{
		String tmp = evt.getActionCommand();
		if(tmp.equals("Send")){
			sendSMS();
		}
		else if (tmp.equals("Exit")){
			exitClicked();
		}
	}
	public void sendSMS()
	{
	}
	public void exitClicked()
	{
		System.exit(0);
	}
	public void windowDeiconified(WindowEvent evt){
	}
	public void windowClosed(WindowEvent evt){
	}
	public void windowDeactivated(WindowEvent evt){
	}
	public void windowClosing(WindowEvent evt){
		exitClicked();
	}
	public void windowActivated(WindowEvent evt){
	}
	public void windowIconified(WindowEvent evt){
	}
	public void windowOpened(WindowEvent evt){
	}
}
